<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>导航条</title>
    <link rel="stylesheet" href="css/reset.css">
    <style>
        .nav{
            width: 1205px;
            height: 48px;
            background-color: #E8E7E3;
            margin: 20px auto;
        }

        .nav li{
            float: left;
           
            /* height: 48px; */
            line-height: 48px;
        }

        .nav a{
            /* 将a转化为块元素，因为a的父元素li是浮动的，所以不会单独占一行，而是会水平排列 */
            display: block;
            text-decoration: none;
            color: #777;
            font-size: 18px;
            padding: 0 39px;
        }

        .nav a:hover{
            background-color: #3f3f3f;
            color: #E8E7E3;
        }

    </style>
</head>
<body>
    <ul class="nav">
        <li><a href="#">HTML/CSS</a></li>
        <li><a href="#">Browser Side</a></li>
        <li><a href="#">Server Side</a></li>
        <li><a href="#">Programming</a></li>
        <li><a href="#">XML</a></li>
        <li><a href="#">Web Building</a></li>
        <li><a href="#">Reference</a></li>
    </ul>
</body>
</html>